package cc.geguo

/**
 * 作者  Administrator
 * 时间  2017/3/29 13:32
 * 文件  GroovyProject
 * 描述  读取txt 文本
 * D:\IntellWs\GroovyProject\test.txt
 */

def  srcFile = new File('D:\\IntellWs\\GroovyProject\\test.txt')
def targetFile = new File('D:\\IntellWs\\GroovyProject\\test3.txt')
/*
* 传入一个 outputStrean
* */
targetFile.withOutputStream {
    os-> srcFile.withInputStream {
        is-> os << is
    }
}



